﻿using System.Linq;
using Project.IBIZ;
using Project.DTO;
using Project.IDAO;
using Project.DAO;
using Project.DBMAPPING;
using System.Collections.Generic;

namespace Project.BIZ
{
    /// <summary>
    /// Class define business method(s) for displaying product list of a specific category
    /// </summary>
    public class ProductListBIZ : IProductListBIZ
    {
        /// <summary>
        /// Global instance of ProductListDAO
        /// </summary>
        IProductListDAO ProductListDao = new ProductListDAO();

        /// <summary>
        /// Load product list of a specific category
        /// </summary>
        /// <param name="categoryID">Input category ID</param>
        /// <returns>List of products</returns>
        public List<SP_PRODUCT_LOADPRODUCTLISTResult> LoadProductList(int categoryID)
        {
            return ProductListDao.LoadProductList(categoryID);
        }
    }
}
